/*
 * @Author: TY.潼教练 3175152880@qq.com
 * @Date: 2025-03-13
 * @LastEditors: TY.潼教练 3175152880@qq.com
 * @LastEditTime: 2025-03-13
 * @FilePath: \ZTWork\src\service\assist\forum\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
/**
*@Author: ZT
*@Description: 论坛管理
*@Date 2025-03-13
*/
import request from '@/http'


// 新增
export const fPosts = async (data: object) => {
  return await request.post({
    url: '/api/bizz/fPosts',
    data: data
  })
}

// 新增评论
export const fComments = async (data: object) => {
  return await request.post({
    url: '/api/bizz/fComments',
    data: data
  })
}


// 帖子分页查询
export const getPage = async (data: object) => {
  return await request.post({
    url: '/api/bizz/fPosts/getPage',
    data: data
  })
}

// 展开评论分页查询
export const getPageMore = async (data: object) => {
  return await request.post({
    url: '/api/bizz/fComments/getPage',
    data: data
  })
}

// 删除
export const del  = async (data: Array<any>) => {
  return await request.post({
    url: '/api/bizz/fPosts/delete',
    data,
    headersType: 'application/x-www-form-urlencoded'
  })
}

// 删除评论
export const delpl = async (data: Array<any>) => {
  return await request.post({
    url: '/api/bizz/fComments/delete',
    data,
    headersType: 'application/x-www-form-urlencoded'
  })
}



// 查询详情
export const getInfo = async (id: String) => {
  return await request.get({
    url: "/api/bizz/fPosts/getInfo/" + id,
  });
}
//修改
export const update = async (data: object) => {
  return await request.post({
    url: '/api/bizz/fPosts/update',
    data: data
  })
}
// 查询未读
export const queryNumbers = async (id: String,pageType:string) => {
  return await request.get({
    url: "/api/bizz/fPosts/queryNumbers/" + id +"/"+pageType,
  });
}


